<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/11/2
  Time: 21:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="${pageContext.request.contextPath}/assets/images/favicon.png" type="image/png">
    <title>用户列表</title>

    <!--Begin  Page Level  CSS -->
    <link href="${pageContext.request.contextPath}/assets/plugins/morris-chart/morris.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet"/>
    <!--End  Page Level  CSS -->
    <link href="${pageContext.request.contextPath}/assets/css/icons.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/style.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/responsive.css" rel="stylesheet">
    <style>


        .main-content {
            background-color: white;
        }

        tr td a {
            margin-right: 10px;
        }

        .container .table thead tr th {
            line-height: 60px;
            text-align: center;
        }

        .container .table tbody tr td {
            line-height: 60px;
        }

        .btn {
            border-radius: 5px;
        }

        .pagination {
            margin-right: 812px;
        }

        .container input {
            margin: 10px auto;
        }

        .seach {
            position: absolute;
            left: 1300px;
            top: 150px;
        }

        .seach a {
            display: inline-block;
            background: dimgray;
            color: whitesmoke;
            width: 75px;
            height: 32px;
            line-height: 32px;
            text-align: center;
            border-radius: 5px;
        }

        .indexOne {
            margin-left: 75px;
        }

        .form-control {
            display: inline;
        }

        .pagination .allOrder {
            display: inline-block;
            height: 40px;
            width: 100px;
            background: whitesmoke;
            color: dodgerblue;
            text-align: center;
            font-size: 16px;
            line-height: 25px;
            margin-left: 15px;
            padding: 3px;
            border-radius: 5px;
        }

        .pagination .btn-default {
            width: 50px;
            height: 36px;
            background: darkgrey;
        }

        .allDelete {
            display: inline-block;
            width: 20px;
            font-size: 25px;
            color: blueviolet;
        }

    </style>
</head>

<body class="sticky-header">

<jsp:include page="../inc/left.jsp"/>

<div class="main-content">
    <jsp:include page="../inc/header.jsp"/>

    <div class="header-section">

        <a class="toggle-btn"><i class="fa fa-bars"></i></a>

        <form class="searchform">
            <input type="text" class="form-control" name="keyword" placeholder="Search here..."/>
        </form>

        <!--notification menu start -->
        <div class="menu-right">
            <ul class="notification-menu">
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle info-number" data-toggle="dropdown">
                        <i class="fa fa-tasks"></i>
                        <span class="badge">8</span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-head pull-right">
                        <h5 class="title">You have 8 pending task</h5>
                        <ul class="dropdown-list">
                            <li class="notification-scroll-list notification-list ">
                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa  fa-shopping-cart noti-primary"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">A new order has been placed.</h5>
                                            <p class="m-0">
                                                <small>29 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-check noti-success"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">Databse backup is complete</h5>
                                            <p class="m-0">
                                                <small>12 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-user-plus noti-info"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">New user registered</h5>
                                            <p class="m-0">
                                                <small>17 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-diamond noti-danger"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">Database error.</h5>
                                            <p class="m-0">
                                                <small>11 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>

                                <!-- list item-->
                                <a href="javascript:void(0);" class="list-group-item">
                                    <div class="media">
                                        <div class="pull-left p-r-10">
                                            <em class="fa fa-cog noti-warning"></em>
                                        </div>
                                        <div class="media-body">
                                            <h5 class="media-heading">New settings</h5>
                                            <p class="m-0">
                                                <small>18 min ago</small>
                                            </p>
                                        </div>
                                    </div>
                                </a>
                            </li>
                            <li class="last"><a href="#">View all notifications</a></li>
                        </ul>
                    </div>
                </li>

                <li>
                    <a href="#" class="btn btn-default dropdown-toggle info-number" data-toggle="dropdown">
                        <i class="fa fa-bell-o"></i>
                        <span class="badge">4</span>
                    </a>
                    <div class="dropdown-menu dropdown-menu-head pull-right">
                        <h5 class="title">Notifications</h5>
                        <ul class="dropdown-list normal-list">
                            <li class="message-list message-scroll-list">
                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-8.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">15 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-7.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">10 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>

                                <a href="#">
                                    <span class="photo"> <img
                                            src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg"
                                            class="img-circle" alt="img"></span>
                                    <span class="subject">John Doe</span>
                                    <span class="message"> New tasks needs to be done</span>
                                    <span class="time">20 minutes ago</span>
                                </a>
                            </li>
                            <li class="last"><a href="#">All Messages</a></li>
                        </ul>
                    </div>
                </li>
                <li>
                    <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                        <img src="${pageContext.request.contextPath}/assets/images/users/avatar-6.jpg" alt=""/>
                        John Doe
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                        <li><a href="#"> <i class="fa fa-wrench"></i> Settings </a></li>
                        <li><a href="#"> <i class="fa fa-user"></i> Profile </a></li>
                        <li><a href="#"> <i class="fa fa-info"></i> Help </a></li>
                        <li><a href="#"> <i class="fa fa-lock"></i> Logout </a></li>
                    </ul>
                </li>

            </ul>
        </div>
        <!--notification menu end -->

    </div>

    <div class="wrapper" style="background:rgb(238, 238, 238)">

        <div class="page-title-box" style="background:#FFFFFF;">
            <h4 class="page-title">退货申请处理</h4>
            <ol class="breadcrumb">
                <li>
                    <a href="index">首页</a>
                </li>
                <li>
                    <a href="orderList">订单</a>
                </li>
                <li class="active">
                    退货申请处理
                </li>
            </ol>
            <div class="clearfix"></div>
        </div>
        <div class="container"
             style="margin-top: 50px;  border:solid 1px rgba(0,0,0,0.2);padding: 20px;background-color:white ;">
            筛选搜索
            <form action="returnApplyList" method="post" class="indexOne">
                输入搜索： <input type="text" name="orderSn" placeholder="服务单号"/>&emsp;&emsp;&emsp;&emsp;
                处理状态：
                <select class="form-control" style="width: 180px" name="status">
                    <option value="">全部</option>
                    <c:forEach items="${returnStatus}" var="ct">
                        <c:if test="${ct==0}">
                            <option value="0">待处理</option>
                        </c:if> <c:if test="${ct==1}">
                        <option value="1">退货中</option>
                    </c:if> <c:if test="${ct==2}">
                        <option value="2">已完成</option>
                    </c:if> <c:if test="${ct==3}">
                        <option value="3">已拒绝</option>
                    </c:if></c:forEach>
                </select>&emsp;&emsp;&emsp;&emsp;
                申请时间： <input type="date" name="createTime" placeholder="申请时间"/>&emsp;&emsp;&emsp;&emsp;<br>
                操作人员： <input type="text" name="handleMan" placeholder="操作人员"/>&emsp;&emsp;&emsp;&emsp;
                处理时间： <input type="date" name="handleTime" placeholder="处理时间"/>
                <div class="seach">
                    <a class="bnt" href="${pageContext.request.contextPath}/order/returnApplyList">重置</a>
                    <input type="submit" value="搜索" class="btn btn-primary" style="margin-left: 25px;width: 75px;">
                </div>
            </form>
        </div>


        <div class="container"
             style="margin-top: 50px;background:#FFFFFF;padding-left: 0;padding-right: 0;  border:solid 1px rgba(0,0,0,0.2);background-color:white ;">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <%--                    <th>编号</th>--%>
                    <th>服务单号</th>
                    <th>申请时间</th>
                    <th>用户账号</th>
                    <th>退款金额</th>
                    <th>申请状态</th>
                    <th>处理时间</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody style="text-align: center">


                <c:forEach items="${pageModel.list}" var="a" varStatus="s">
                    <tr>
                            <%--                        <td>${(s.index+1)+(pageModel.page-1)*pageModel.size}--%>
                            <%--                        </td>--%>
                        <td>${a.id}</td>
                        <td><fmt:formatDate value="${a.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                        <td>${a.memberUsername}</td>
                        <td>${a.productPrice}</td>
                        <td><c:if test="${a.status==0}">
                            待处理</c:if><c:if test="${a.status==1}">
                            退货中</c:if><c:if test="${a.status==2}">
                            已完成</c:if><c:if test="${a.status==3}">
                            已拒绝</c:if>
                        </td>
                        <td>
                            <fmt:formatDate value="${a.handleTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                        <td><a href="checkOrder?id=${a.id}">查看订单</a></td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>

        <nav aria-label="..." style="text-align: right">

            <ul class="pagination">

                <c:if test="${pageModel.page!=1&&pageModel.pageSize!=1}">
                    <li class=""><a
                            href="${pageContext.request.contextPath}/order/returnApplyList?page=${pageModel.page-1}&&size=${pageModel.size}"
                            aria-label="Previous"><span aria-hidden="true">«</span></a></li>
                </c:if>
                <c:forEach begin="1" end="${pageModel.pageSize}" var="i">
                    <li class="${i==pageModel.page?"active":""}"><a
                            href="${pageContext.request.contextPath}/order/returnApplyList?page=${i}&&size=${pageModel.size}">${i}</a>
                    </li>
                </c:forEach>
                <c:if test="${pageModel.page!=pageModel.pageSize&&pageModel.pageSize!=1}">
                    <li>
                        <a href="${pageContext.request.contextPath}/order/returnApplyList?page=${pageModel.page+1}&&size=${pageModel.size}"
                           aria-label="Next"><span aria-hidden="true"> » </span></a></li>
                </c:if>
                <li class="allOrder">共${pageModel.count}条数据</li>
                <li><select class="form-control" style="width: 180px" name="status" id="size">
                    <option value="8">默认</option>
                    <option value="5">5条/页</option>
                    <option value="10">10条/页</option>
                    <option value="15">15条/页</option>
                </select></li>

            </ul>

        </nav>
    </div>
</div>


<!--Begin core plugin -->
<script src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/moment/moment.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.slimscroll.js "></script>
<script src="${pageContext.request.contextPath}/assets/js/jquery.nicescroll.js"></script>
<script src="${pageContext.request.contextPath}/assets/js/functions.js"></script>
<!-- End core plugin -->

<!--Begin Page Level Plugin-->
<script src="${pageContext.request.contextPath}/assets/plugins/morris-chart/morris.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/morris-chart/raphael-min.js"></script>
<script src="${pageContext.request.contextPath}/assets/plugins/jquery-sparkline/jquery.charts-sparkline.js"></script>
<script src="${pageContext.request.contextPath}/assets/pages/dashboard.js"></script>
<!--End Page Level Plugin-->

<script>
    $("#size").bind("change", function () {
        let size = $("#size").val()
        location.href = "/mall/order/returnApplyList?size=" + size
    })
</script>
</body>
</html>
